var React = require('react');
var ReactDOM = require('react-dom');
var FooterComponent = require('./child.js');

var HeaderComponent = React.createClass({
      render:function(){        
        return (  <div>
                    <h1>Header Component</h1>
                    <ListComponent/>
                    <FooterComponent/>
                  </div>
               )
      }
    });

    var ListComponent = React.createClass({
      render:function(){
        
        return (  <div>
                    <h1>List Component</h1>
                  </div>
               )
      }
    });

    
    
    /*
        尝试：多次往一个节点渲染组件过程，会出现将最后一个组件渲染之前组件过程
    */
    
    ReactDOM.render( <HeaderComponent/>, 
      document.getElementById('example'),
      function(){
        console.log('渲染完成啦！！');
      }
    )
    